/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */
package com.kee.example.runner;

import com.kee.example.dao.TestDao;
import com.kee.example.domain.Test;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 8/21/12
 * @since 2.4. /2012-08-21
 */
public class TestRunner {

    private static final long ORDER_NUMBER = 123456789L;

    public static void main(String[] args) {
        TestRunner testRunner = new TestRunner();
        testRunner.initData();
    }

    private void initData() {
        //Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        //session.beginTransaction();
        Test test = new Test();
        test.setOrderNumber(ORDER_NUMBER);
        TestDao testDao = new TestDao();
        testDao.save(test);

        Test test1 = testDao.findByOrderNumber(ORDER_NUMBER);
        System.out.println("test1.getId() = " + test1.getId());
        System.out.println("test1.getOrderNumber() = " + test1.getOrderNumber());
        //session.save(test);
        //session.getTransaction().commit();
    }
}
